package com.fqgj.sentry.policy.server;


import com.fqgj.sentry.policy.client.FunColumnService;
import com.fqgj.sentry.policy.client.FunctionService;
import com.fqgj.sentry.policy.dao.PcFunctionColumnDao;
import com.fqgj.sentry.policy.dao.PcFunctionContextDao;
import com.fqgj.sentry.policy.entity.PcFunctionColumnEntity;
import com.fqgj.sentry.policy.entity.PcFunctionContextEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FunctionServiceImpl implements FunctionService{

    @Autowired
    private PcFunctionColumnDao functionColumnDao;

    @Autowired
    private PcFunctionContextDao functionContextDao;

    @Override
    public List<PcFunctionColumnEntity> selectParamsByColumnId(Long columnId) {
        return functionColumnDao.findByFunctionId(columnId);
    }

    @Override
    public PcFunctionContextEntity selectScriptByColumnId(Long columnId) {
        return functionContextDao.findByFunctionId(columnId);
    }
}
